package itcz.example.pattern.behavior_type.chain;

/**
 * @ClassName: Client
 * @Author: ITCZ
 * @Date: 2025-07-24
 * @Description:
 */
public class Client {
    public static void main(String[] args) {

        //请假条来一张
        LeaveRequest leave = new LeaveRequest("小花",5,"身体不适");

        //各位领导
        GroupLeader groupLeader = new GroupLeader();
        Manager manager = new Manager();
        GeneralManager generalManager = new GeneralManager();

        groupLeader.setNextHandler( manager);
        manager.setNextHandler( generalManager);
        groupLeader.submit(leave);
    }
}
